Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Segment accessibility #46

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Gustash
Copy link

@Gustash Gustash commented May 5, 2022

This PR is based on the conversation in #31.

Since no new PR was added, and that PR was not updated, this one finishes the implementation started in that PR.

Changes

  • Export SegmentedControlProps interface
  • Added Segment interface
  • Changed segments from an array of strings to a mixed array of strings and Segment objects
  • Transforming segments prop into an array of Segment objects and memoizing it. This keeps backwards compatibility by allowing a full array of strings to be passed
  • Setting default accessibility values in each segment Pressable
  • Overriding the default accessibility values by spreading the remaining Segment accessibility values for each segment, if defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant